<template>
  <view :style="themeColor">
    <view class="page">
      <view class="flex benben-position-layout flex flex-wrap align-center myOrder_flex_0"
        :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
        <view class='flex flex-wrap align-center justify-between flex-sub myOrder_fd0_0'>
          <view class='flex flex-wrap align-center myOrder_fd0_0_c0' @tap.stop="handleJumpDiy" data-type="back"
            data-url="1">
            <text class='fu-iconfont2  myOrder_fd0_0_c0_c0'>&#xE794;</text>
          </view>
          <view class='flex flex-wrap align-stretch justify-center'>
            <text class='myOrder_fd0_0_c1_c0'>我的订单</text>
          </view>
          <view class='flex flex-wrap align-center justify-end myOrder_fd0_0_c0'>
          </view>
        </view>

      </view>
      <view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
      <!---flex布局flex布局开始-->
      <view class="flex flex-direction flex-wrap align-stretch benben-flex-layout myOrder_flex_1">
        <template v-for='(item,key0) in dataList'>
          <view class='flex flex-direction flex-wrap align-stretch myOrder_fd1_0' :key='key0'>
            <view class='flex flex-wrap align-center myOrder_fd1_0_c0'>
              <view class='flex flex-wrap align-center'>
                <text class='myOrder_fd1_0_c0_c0_c0'>订单编号：</text>
                <text class='myOrder_fd1_0_c0_c0_c0'>{{item.dingdanhao}}</text>
              </view>
              <text class='myOrder_fd1_0_c0_c1'>{{item.zhifuzhuangtai_name}}</text>
            </view>
            <view class='flex flex-direction flex-wrap align-stretch myOrder_fd1_0_c0' v-if=" item.leixing=='2'">
              <view class='flex flex-wrap align-center'>
                <text class='myOrder_fd1_0_c1_c0_c0'>{{item.buy_fenlei_name}}</text>
                <text class='myOrder_fd1_0_c1_c0_c0'>{{item.buy_info.shuliang}}吨</text>
              </view>
              <view class='flex flex-wrap align-start myOrder_fd1_0_c1_c1'>
                <image class='myOrder_fd1_0_c1_c1_c0' v-if="item.buy_info.tupian.length" mode="aspectFill"
                  :src='item.buy_info.tupian[0]'></image>
                <view class='flex flex-direction flex-wrap align-stretch flex-sub'>
                  <view class='flex flex-wrap align-center'>
                    <view class='flex flex-wrap align-center myOrder_fd1_0_c1_c1_c1_c0_c0'>
                      <text class='myOrder_fd1_0_c1_c1_c1_c0_c0_c0'>{{item.buy_info.buycate_mingcheng}}</text>
                    </view>
                    <view class='flex flex-wrap align-center flex-sub'>
                      <text class='myOrder_fd1_0_c1_c1_c1_c0_c1_c0'>数量</text>
                      <text class='myOrder_fd1_0_c1_c1_c1_c0_c1_c1'>{{item.buy_info.shuliang}}吨</text>
                    </view>
                  </view>
                  <view class='flex flex-wrap align-center myOrder_fd1_0_c1_c1_c1_c1'>
                    <view class='flex flex-wrap align-center myOrder_fd1_0_c1_c1_c1_c0_c0'>
                      <text class='myOrder_fd1_0_c1_c1_c1_c0_c1_c0'>年份</text>
                      <text class='myOrder_fd1_0_c1_c1_c1_c0_c1_c1'>{{item.buy_info.nianfen}}</text>
                    </view>
                    <view class='flex flex-wrap align-center flex-sub'>
                      <text class='myOrder_fd1_0_c1_c1_c1_c0_c1_c0'>水分</text>
                      <text class='myOrder_fd1_0_c1_c1_c1_c0_c1_c1'>{{item.buy_info.buyshuifen_id_name}}</text>
                    </view>
                  </view>
                  <view class='flex flex-wrap align-center myOrder_fd1_0_c1_c1_c1_c1'>
                    <view class='flex flex-wrap align-center myOrder_fd1_0_c1_c1_c1_c0_c0'>
                      <text class='myOrder_fd1_0_c1_c1_c1_c0_c1_c0'>净毛</text>
                      <text class='myOrder_fd1_0_c1_c1_c1_c0_c1_c1'>{{item.buy_info.buyzazhi_id_name}}</text>
                    </view>
                    <view class='flex flex-wrap align-center flex-sub'>
                      <text class='myOrder_fd1_0_c1_c1_c1_c0_c1_c0'>地区</text>
                      <text class='myOrder_fd1_0_c1_c1_c1_c2_c1_c1'>{{item.buy_info.suozaidi}}</text>
                    </view>
                  </view>
                  <view class='flex flex-wrap align-center' v-if="item.buyqita_mingcheng.length
                  ">
                    <view class='flex flex-wrap align-center myOrder_fd1_0_c1_c1_c1_c3_c0'
                      v-for="(itemC,indexC) in item.buyqita_mingcheng" :key="indexC">
                      <text class='myOrder_fd1_0_c1_c1_c1_c3_c0_c0'>{{itemC}}</text>
                    </view>
                  </view>
                  <view class="flex flex-wrap align-center text-333 text-df">
                    {{item.buy_info.qita}}
                  </view>
                </view>
              </view>
            </view>
            <view class='flex flex-wrap align-center myOrder_fd1_0_c0' v-if=" item.leixing=='3'">
              <image class='myOrder_fd1_0_c2_c0' mode="aspectFit" :src='STATIC_URL+"65.png"'></image>
              <view class='flex flex-direction flex-wrap align-stretch flex-sub'>
                <text class='myOrder_fd1_0_c1_c0_c0'>{{item.liangzhan_info.mingcheng}}</text>
                <text class='myOrder_fd1_0_c2_c1_c1'>{{item.liangzhan_info.weizhi}}</text>
                <view class='flex flex-wrap align-center myOrder_fd1_0_c2_c1_c2'>
                  <text class='myOrder_fd1_0_c2_c1_c2_c0'>经营</text>
                  <text class='myOrder_fd1_0_c2_c1_c2_c0'>{{item.liangzhan_info.jingyingnianxian}}年</text>
                  <text class='myOrder_fd1_0_c2_c1_c2_c0'>丨距您</text>
                  <text class='myOrder_fd1_0_c2_c1_c2_c0'>{{item.liangzhan_info.distance || 0}}</text>
                </view>
                <view class='flex flex-wrap align-center myOrder_fd1_0_c2_c1_c3'>
                  <text
                    class='myOrder_fd1_0_c2_c1_c3_c0'>{{item.liangzhan_info.liangzhan_cate_pid1_text}}{{item.liangzhan_info.liangzhan_cate_pid2_text}}{{item.liangzhan_info.liangzhan_cate_pid3_text}}</text>
                  <view class='flex flex-wrap align-center myOrder_fd1_0_c2_c1_c3_c1'
                    v-if="item.liangzhan_info.liangzhan_cate_pid4">
                    <text
                      class='myOrder_fd1_0_c1_c1_c1_c3_c0_c0'>{{item.liangzhan_info.liangzhan_cate_pid4_text}}</text>
                  </view>
                  <view class='flex flex-wrap align-center myOrder_fd1_0_c2_c1_c3_c1'
                    v-if="item.liangzhan_info.liangzhan_cate_pid5">
                    <text
                      class='myOrder_fd1_0_c1_c1_c1_c3_c0_c0'>{{item.liangzhan_info.liangzhan_cate_pid5_text}}</text>
                  </view>
                  <view class='flex flex-wrap align-center myOrder_fd1_0_c2_c1_c3_c1'
                    v-if="item.liangzhan_info.liangzhan_cate_pid6">
                    <text
                      class='myOrder_fd1_0_c1_c1_c1_c3_c0_c0'>{{item.liangzhan_info.liangzhan_cate_pid6_text}}</text>
                  </view>
                </view>
                <view class='flex flex-wrap align-center myOrder_fd1_0_c2_c1_c4'>
                  <image class='myOrder_fd1_0_c2_c1_c4_c0' v-if="item.liangzhan_info.zhuangtai==2" mode="aspectFit"
                    :src='STATIC_URL+"5.png"'></image>
                  <text class='myOrder_fd1_0_c2_c1_c4_c1' v-if="item.liangzhan_info.zhuangtai==2">已实名认证</text>
                  <image class='myOrder_fd1_0_c2_c1_c4_c2' v-if="item.liangzhan_info.is_vip" mode="aspectFit"
                    :src='STATIC_URL+"5.png"'></image>
                  <text class='myOrder_fd1_0_c2_c1_c4_c1' v-if="item.liangzhan_info.is_vip">VIP会员</text>
                </view>
              </view>
            </view>
            <view class='flex flex-direction flex-wrap align-stretch'>
              <view class='flex flex-wrap align-center myOrder_fd1_0_c3_c0'>
                <text class='myOrder_fd1_0_c3_c0_c0'>订单名称</text>
                <text class='myOrder_fd1_0_c1_c1_c1_c0_c1_c1'>{{item.leixing_name}}</text>
              </view>
              <view class='flex flex-direction flex-wrap align-stretch' v-if=" item.leixing=='1'">
                <view class='flex flex-wrap align-center myOrder_fd1_0_c3_c0'>
                  <text class='myOrder_fd1_0_c3_c0_c0'>购买年限</text>
                  <text class='myOrder_fd1_0_c1_c1_c1_c0_c1_c1'>{{item.vip_mingcheng}}</text>
                </view>
                <view class='flex flex-wrap align-center myOrder_fd1_0_c3_c0'>
                  <text class='myOrder_fd1_0_c3_c0_c0'>生效时间</text>
                  <text class='myOrder_fd1_0_c1_c1_c1_c0_c1_c1'>2022-12-02</text>
                </view>
              </view>
              <view class='flex flex-wrap align-center myOrder_fd1_0_c3_c0'>
                <text class='myOrder_fd1_0_c3_c0_c0'>订单时间</text>
                <text class='myOrder_fd1_0_c1_c1_c1_c0_c1_c1'>{{item.create_time}}</text>
              </view>
              <view class='flex flex-wrap align-center myOrder_fd1_0_c3_c0'>
                <text class='myOrder_fd1_0_c3_c0_c0'>订单金额</text>
                <text class='myOrder_fd1_0_c3_c3_c1'>￥</text>
                <text class='myOrder_fd1_0_c3_c3_c1'>{{item.jiage}}</text>
              </view>
              <view class='flex flex-wrap align-center myOrder_fd1_0_c3_c0' v-if=" item.zhifuzhuangtai=='2'">
                <text class='myOrder_fd1_0_c3_c0_c0'>订单状态</text>
                <text class='myOrder_fd1_0_c1_c1_c1_c0_c1_c1'>{{item.zhifuzhuangtai_name}}</text>
              </view>
            </view>
          </view>
        </template>
        <fu-empty-ui v-if="dataList.length==0"></fu-empty-ui>
      </view>

      <!---flex布局flex布局结束-->


    </view>
  </view>
</template>
<script>
  import pagingList from '@/common/mixin/paging_list.js';
  export default {
    components: {},
    mixins: [pagingList],

    data() {
      return {
        "orderList": [{
          "aid": "1",
          "type": "1"
        }, {
          "aid": "2",
          "type": "2"
        }, {
          "aid": "3",
          "type": "3"
        }],
        "minixPagingListsApi": "",
        "pageingListApiMethod": "",
        "allowOnloadGetList": false,
        dataList: [],
        address: {
          latitude: '',
          longitude: '',
          city: ''
        }
      };
    },
    computed: {
      themeColor() {
        return this.$store.getters.themeColor
      },

    },
    watch: {},
    onLoad(options) {
      this.getList()
    },
    onUnload() {

    },
    onReady() {

    },
    onShow() {
      let that = this
      if (uni.getStorageSync('address')) {
        this.address = uni.getStorageSync('address')
        console.log(' this.address', this.address)
        console.log('  this.Address.city', this.Address.city)
      } else {
        uni.getLocation({
          type: 'gcj02',
          // #ifdef APP
          geocode: true,
          // #endif
          isHighAccuracy: true,
          success: adr => {
            console.log('adradradradr', adr)
            const obj = {
              latitude: adr.latitude,
              longitude: adr.longitude,
              city: adr.address.city
            }
            uni.setStorageSync('address', obj)
            this.address = uni.getStorageSync('address')
          },
          fail: (fail) => {
            console.log('fail', fail)
          }
        })
      }

    },
    onHide() {

    },
    onResize() {

    },
    onPullDownRefresh() {

    },
    onReachBottom(e) {

    },
    onPageScroll(e) {

    },
    methods: {
      getList() {
        this.minixPagingListsApi = global.apiUrls.post65d441a9a8643;
        this.pageingListApiMethod = 'post';
        this.allowOnloadGetList = false;
        this.pagingListPostDataContent = {
          lat: this.address.latitude,
          lng: this.address.longitude
        }
        this.listData = [];
        this.dataList = this.listData;
        this.pagingListToggle();
        console.log(this.dataList)
      },
      pagingListPostData() {
        return this.pagingListPostDataContent
      },
    }
  };
</script>
<style lang="scss" scoped>
  .page {
    width: 100vw;
    overflow-x: hidden;
    min-height: calc(100vh - var(--window-bottom));
    background: rgba(248, 248, 250, 1);
    background-size: 100% auto;
  }

  .myOrder_flex_0 {
    background: #fff;
    width: 750rpx;
    height: 88rpx;
    overflow: hidden;
    z-index: 10;
    top: 0rpx;
    background-size: 100% auto !important;
  }

  .myOrder_fd0_0_c1_c0 {
    font-size: 36rpx;
    font-weight: 700;
    color: #333333;
    line-height: 50rpx;
  }

  .myOrder_fd0_0_c0_c0 {
    font-size: 36rpx;
    color: #333;
  }

  .myOrder_fd0_0_c0 {
    width: 120rpx;
  }

  .myOrder_fd0_0 {
    padding: 0rpx 32rpx 0rpx 32rpx;
  }

  .myOrder_flex_1 {
    padding: 24rpx 30rpx 0rpx 30rpx;
  }

  .myOrder_fd1_0_c3_c3_c1 {
    color: #FF5050;
    font-size: 30rpx;
    font-weight: 700;
    line-height: 32rpx;
  }

  .myOrder_fd1_0_c3_c0_c0 {
    color: #999999;
    font-size: 28rpx;
    font-weight: 400;
    line-height: 32rpx;
    margin: 0rpx 50rpx 0rpx 0rpx;
  }

  .myOrder_fd1_0_c3_c0 {
    margin: 32rpx 0rpx 0rpx 0rpx;
  }

  .myOrder_fd1_0_c2_c1_c4_c2 {
    width: 40rpx;
    height: 40rpx;
    border-radius: 0rpx 0rpx 0rpx 0rpx;
    margin: 0rpx 16rpx 0rpx 34rpx;
  }

  .myOrder_fd1_0_c2_c1_c4_c1 {
    color: #C86105;
    font-size: 26rpx;
    font-weight: 400;
    line-height: 26rpx;
  }

  .myOrder_fd1_0_c2_c1_c4_c0 {
    width: 40rpx;
    height: 40rpx;
    border-radius: 0rpx 0rpx 0rpx 0rpx;
    margin: 0rpx 16rpx 0rpx 0rpx;
  }

  .myOrder_fd1_0_c2_c1_c4 {
    margin: 17rpx 0rpx 0rpx 0rpx;
  }

  .myOrder_fd1_0_c2_c1_c3_c1 {
    background: rgba(244, 247, 255, 1);
    margin: 0rpx 0rpx 0rpx 24rpx;
    padding: 4rpx 14rpx 4rpx 14rpx;
    border-radius: 4rpx;
    background-size: 100% auto;
  }

  .myOrder_fd1_0_c2_c1_c3_c0 {
    color: #333333;
    font-size: 28rpx;
    font-weight: 400;
    line-height: 32rpx;
  }

  .myOrder_fd1_0_c2_c1_c3 {
    margin: 24rpx 0rpx 0rpx 0rpx;
  }

  .myOrder_fd1_0_c2_c1_c2_c0 {
    color: rgba(153, 153, 153, 1);
    font-size: 24rpx;
    font-weight: 400;
    line-height: 32rpx;
  }

  .myOrder_fd1_0_c2_c1_c2 {
    margin: 10rpx 0rpx 0rpx 0rpx;
  }

  .myOrder_fd1_0_c2_c1_c1 {
    color: #666666;
    font-size: 28rpx;
    font-weight: 400;
    line-height: 28rpx;
    margin: 14rpx 0rpx 0rpx 0rpx;
  }

  .myOrder_fd1_0_c2_c0 {
    width: 220rpx;
    height: 266rpx;
    border-radius: 0rpx 0rpx 0rpx 0rpx;
    margin: 0rpx 24rpx 0rpx 0rpx;
  }

  .myOrder_fd1_0_c1_c1_c1_c3_c0_c0 {
    color: #667D91;
    font-size: 24rpx;
    font-weight: 500;
    line-height: 24rpx;
  }

  .myOrder_fd1_0_c1_c1_c1_c3_c0 {
    background: rgba(244, 247, 255, 1);
    padding: 4rpx 14rpx 4rpx 14rpx;
    border-radius: 4rpx;
    background-size: 100% auto;
    margin: 24rpx 15rpx 0rpx 0rpx;
  }

  .myOrder_fd1_0_c1_c1_c1_c2_c1_c1 {
    color: #101010;
    font-size: 30rpx;
    font-weight: 500;
    line-height: 32rpx;
    -webkit-line-clamp: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    width: 137rpx;
  }

  .myOrder_fd1_0_c1_c1_c1_c1 {
    margin: 20rpx 0rpx 0rpx 0rpx;
  }

  .myOrder_fd1_0_c1_c1_c1_c0_c1_c1 {
    color: #101010;
    font-size: 30rpx;
    font-weight: 500;
    line-height: 32rpx;
  }

  .myOrder_fd1_0_c1_c1_c1_c0_c1_c0 {
    color: #999999;
    font-size: 28rpx;
    font-weight: 400;
    line-height: 32rpx;
    margin: 0rpx 24rpx 0rpx 0rpx;
  }

  .myOrder_fd1_0_c1_c1_c1_c0_c0_c0 {
    color: #101010;
    font-size: 28rpx;
    font-weight: 400;
    line-height: 32rpx;
    margin: 0rpx 24rpx 0rpx 0rpx;
  }

  .myOrder_fd1_0_c1_c1_c1_c0_c0 {
    width: 180rpx;
  }

  .myOrder_fd1_0_c1_c1_c0 {
    width: 190rpx;
    height: 235rpx;
    border-radius: 0rpx 0rpx 0rpx 0rpx;
    margin: 0rpx 24rpx 0rpx 0rpx;
  }

  .myOrder_fd1_0_c1_c1 {
    margin: 21rpx 0rpx 0rpx 0rpx;
  }

  .myOrder_fd1_0_c1_c0_c0 {
    color: #101010;
    font-size: 34rpx;
    font-weight: 500;
    line-height: 34rpx;
  }

  .myOrder_fd1_0_c0_c1 {
    margin: 0rpx 0rpx 0rpx auto;
    color: #FD513D;
    font-size: 28rpx;
    font-weight: 500;
    line-height: 32rpx;
  }

  .myOrder_fd1_0_c0_c0_c0 {
    color: #333333;
    font-size: 32rpx;
    font-weight: 500;
    line-height: 32rpx;
  }

  .myOrder_fd1_0_c0 {
    border-bottom: 1px solid #eee;
    padding: 32rpx 0rpx 32rpx 0rpx;
  }

  .myOrder_fd1_0 {
    background: rgba(255, 255, 255, 1);
    border-radius: 16rpx;
    background-size: 100% auto;
    margin: 0rpx 0rpx 24rpx 0rpx;
    padding: 0rpx 24rpx 32rpx 24rpx;
  }
</style>
